
package testivrs.testivrs;

import junit.framework.TestCase;
import org.junit.*;
import junit.framework.JUnit4TestAdapter;

public class TestExample extends TestCase {
	public void teststudentreg() throws Exception {
		
		StudentReg d = new StudentReg();
		assertEquals(true,d.doPost("Stupidabcde", "2009098", "9868564360"));
		assertEquals(false,d.doPost("jk123", "2009021", "9867541234"));
		assertEquals(false,d.doPost("StudentX", "2009087", "876543"));
		assertEquals(false,d.doPost("StudentX", "iiitd2009087", "9868776878"));
		assertEquals(false,d.doPost("Stupidabcde", "2009098", "9868564360"));
		
		}
	
public void testfacultyreg() throws Exception {
		
		FacultyReg d = new FacultyReg();
		assertEquals(true,d.Post("Ashishs", "9810215234", "ashish123@iiitd.ac.in", "worldno42","worldno42"));
		assertEquals(false,d.Post("Ashish Surekha", "98102138", "ashish@iiitd.ac.in", "worldno42","worldno42"));
		assertEquals(false,d.Post("Ashish Surekha", "9810214238", "ashishiiitd.ac.in", "worldno42","worldno42"));
		assertEquals(false,d.Post("Ashish Surekha", "9810214238", "ashish@iiitd.ac.in", "worldno42","worldno421"));
		assertEquals(false,d.Post("Ashishs", "9810215234", "ashish123@iiitd.ac.in", "worldno42","worldno42"));
		assertEquals(true,d.Post("Ashish Surekha123", "9810214238", "ashish@iiitd.ac.in", "worldno42","worldno42"));
		
		}


public void testgetlogindetails() throws Exception {
	
	GetLoginDetails d = new GetLoginDetails();
	assertEquals(false,d.doPost("jatin@iiitd.ac.in", "abcd"));
	assertEquals(true,d.doPost("jatin", "129845"));
	assertEquals(true,d.doPost("Ashish", "worldno42"));
	
	}
	
	
	
	
	/*public void testisPalindrome() {
		Main fac = new Main();
		assertEquals(true,fac.isPalindrome(""));
		//product = five.times(3);
		assertEquals(true, fac.isPalindrome("s"));
		assertEquals(true, fac.isPalindrome("naman"));
		assertEquals(false, fac.isPalindrome("aayush"));

		}*/
}
